-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix: Preserve 'info' field in COCO-style annotations for compatibility with pycocotools >= 2.0.9 #1844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
downgrade the pycocotools to 2.0.0 |
yes that works as a quick fix, I'm just suggesting a long-term fix to stay aligned with pycocotools |
|
For me, version 2.0.8 worked |
Does this only happened in Evaluator? Using |
Yes, only in Evaluator ! if you think saving memory is crucial here maybe we can just update requirements.txt with version < 2.0.9 |
Could you check if it's in eval mode, if so, don't pop, else pop? |
Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.
This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools
PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9